<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" layout:decorator="secure_template"
      xmlns:layout="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <link rel="stylesheet" th:href="@{/static/bootstrap/css/bootstrap.min.css}" >
    <link rel="stylesheet" th:href="@{/static/css/index.css}" />
</head>
<body style="background-color: #f1f4f9;">
    <div th:replace="hreader :: html"></div>
    <div class="row container center-block">
        <div class="col-lg-8 col-md-12 col-sm-12 col-xs-12" style="background-color: white;">
            <!-- 页头 -->
            <div class="page-header">
                <h2>
                    <span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
                    发现
                </h2>
            </div>
            <!-- 论坛列表 -->
            <div class="item" th:each="question : ${QUESTION_LIST}">
                <a title="ccdalao - 个人主页" href="/" target="_blank">
                    <img class="img-circle" uid="2329" pos="right" th:src="${question.user.face}" style="cursor: pointer;">
                </a>
                <div class="middle text">
                    <h4 class="title">
                        <a class="forum-name" href="#" th:text="'['+${question.tag}+']'"></a>
                        <a style="" class="thread-title" th:href="'question/'+${question.id}" th:text="${question.title}"></a>

                    </h4>
                    <div class="meta" th:text="${question.user.nickName}+'&nbsp;&nbsp;·&nbsp;&nbsp;发表于 '+${T(com.bbs.utils.DateUtil).getCreateDate(question.createTime)}+'&nbsp;&nbsp;·&nbsp;&nbsp;'+${question.viewCount}+'次浏览'">
                        </div>
                    <div class="comment">
                        <span class="badge badge-success" th:text="${question.commentCount}"></span>
                    </div>
                </div>
            </div>
            <!-- 分页 -->
            <nav aria-label="Page navigation">
                <ul class="pagination">
                    <li>
                        <a th:href="${SEARCH != null && SEARCH != '' ? '/?page=0&search='+SEARCH : '/?page=0'}" aria-label="Previous">
                            <span aria-hidden="true">&laquo;</span>
                        </a>
                    </li>
                    <li><a th:href="${SEARCH != null && SEARCH != '' ? '/?page='+(pStat.index +1)+'&search='+SEARCH : '/?page='+(pStat.index +1)}" th:each="page,pStat : ${PAGE_LIST}" th:text="${pStat.index} +1"></a></li>
                    <li>
                        <a th:href="${SEARCH != null && SEARCH != '' ? '/?page='+PAGE_LIST.size()+'&search='+SEARCH : '/?page='+PAGE_LIST.size()} " aria-label="Next">
                            <span aria-hidden="true">&raquo;</span>
                        </a>
                    </li>
                </ul>
            </nav>

        </div>


        <div class="col-md-3 visible-lg-block col-md-offset-1" style="background-color: white;margin-left: 10px;">
            <!-- 页头 -->
            <div class="page-header">
                <h5>
                    <span class="glyphicon glyphicon-signal" aria-hidden="true"></span>
                    热门话题
                </h5>
            </div>
            <!-- 热门话题列表 -->
            <div>
                <a href="#">
                    <img class="img-rounded" src="https://elasticsearch.cn/static/common/topic-mid-img.png" style="width: 40px; height: 40px;margin-right: 10px;" />
                </a>
                <h5>
                    <a href="#"><span class="label label-info">java话题</span></a>

                </h5>
                <p class="text-muted">100个关注</p>
            </div>

        </div>
    </div>
    <script th:src="@{/static/bootstrap/js/jquery.js}" ></script>
    <script src="/static/bootstrap/js/bootstrap.min.js" ></script>

    <div th:replace="fonter :: html"></div>
</body>
</html>
